/* Open Props */
:where(html) {
  --gray-0: #f8f9fa;
  --gray-1: #f1f3f5;
  --gray-2: #e9ecef;
  --gray-3: #dee2e6;
  --gray-4: #ced4da;
  --gray-5: #adb5bd;
  --gray-6: #868e96;
  --gray-7: #495057;
  --gray-8: #343a40;
  --gray-9: #212529;

  --shadow-color: 220 3% 15%;
  --shadow-strength: 1%;
  --shadow-2: 0 3px 5px -2px hsl(var(--shadow-color) /
          calc(var(--shadow-strength) + 3%)),
    0 7px 14px -5px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 5%));
  --shadow-4: 0 -2px 5px 0 hsl(var(--shadow-color) /
          calc(var(--shadow-strength) + 2%)),
    0 1px 1px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
    0 2px 2px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
    0 5px 5px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 4%)),
    0 9px 9px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 5%)),
    0 16px 16px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 6%));
  --shadow-5: 0 -1px 2px 0 hsl(var(--shadow-color) /
          calc(var(--shadow-strength) + 2%)),
    0 2px 1px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
    0 5px 5px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 3%)),
    0 10px 10px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 4%)),
    0 20px 20px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 5%)),
    0 40px 40px -2px hsl(var(--shadow-color) / calc(var(--shadow-strength) + 7%));
}

/* Color Theming */
html {
  --blue-1: #04b2d9;
  --blue-2: #0378a6;
  --blue-1-rgb: 4, 178, 217;
  --blue-2-rgb: 3, 120, 166;
  --green: #8abf8d;

  --red: #d8000c;
  --red-bg: rgba(255, 186, 186, 0.8);

  --color-init: #d2270c;
  --color-revisit: #19900c;
  --color-bonus: #cb990b;
  --color-init: #cb990b;

  /* light */
  --brand-light: var(--blue-1);
  --brand-rgb-light: var(--blue-1-rgb);
  --text1-light: var(--gray-8);
  --text2-light: var(--gray-7);
  --surface1-light: var(--gray-0);
  --surface2-light: var(--gray-1);
  --surface3-light: var(--gray-2);
  --surface-shadow-light: 220 3% 20%;
  --shadow-strength-light: 2%;

  /* dark */
  --brand-dark: var(--blue-2);
  --brand-rgb-dark: var(--blue-2-rgb);
  --text1-dark: var(--gray-1);
  --text2-dark: var(--gray-3);
  --surface1-dark: var(--gray-7);
  --surface2-dark: var(--gray-8);
  --surface3-dark: var(--gray-9);
  --surface-shadow-dark: 220 3% 14%;
  --shadow-strength-dark: 80%;
}

:root {
  color-scheme: light;

  /* set defaults */
  --brand: var(--brand-light);
  --brand-rgb: var(--brand-rgb-light);
  --text1: var(--text1-light);
  --text2: var(--text2-light);
  --surface1: var(--surface1-light);
  --surface2: var(--surface2-light);
  --surface3: var(--surface3-light);
  --shadow-color: var(--surface-shadow-light);
  --shadow-strength: var(--shadow-strength-light);

  --spacing0: 0.2rem;
  --spacing1: 0.4rem;
  --spacing2: 0.6rem;
  --spacing3: 1rem;
  --spacing4: 1.4rem;

  --max-padding: 10rem;
  --corner-roundness1: 0.25rem;
  --corner-roundness2: var(--spacing2);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --brand: var(--brand-dark);
    --brand-rgb: var(--brand-rgb-dark);
    --text1: var(--text1-dark);
    --text2: var(--text2-dark);
    --surface1: var(--surface1-dark);
    --surface2: var(--surface2-dark);
    --surface3: var(--surface3-dark);
    --shadow-color: var(--surface-shadow-dark);
    --shadow-strength: var(--shadow-strength-dark);
  }
}

[color-scheme="light"] {
  color-scheme: light;

  --brand: var(--brand-light);
  --brand-rgb: var(--brand-rgb-light);
  --text1: var(--text1-light);
  --text2: var(--text2-light);
  --surface1: var(--surface1-light);
  --surface2: var(--surface2-light);
  --surface3: var(--surface3-light);
  --shadow-color: var(--surface-shadow-light);
  --shadow-strength: var(--shadow-strength-light);
}

[color-scheme="dark"] {
  color-scheme: dark;

  --brand: var(--brand-dark);
  --brand-rgb: var(--brand-rgb-dark);
  --text1: var(--text1-dark);
  --text2: var(--text2-dark);
  --surface1: var(--surface1-dark);
  --surface2: var(--surface2-dark);
  --surface3: var(--surface3-dark);
  --shadow-color: var(--surface-shadow-dark);
  --shadow-strength: var(--shadow-strength-dark);
}

/*
  CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* Utility Classes */
.flow > * + * {
  margin-top: 1em;
}

.space-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.column {
  flex-direction: column;
}

.hidden {
  display: none;
}

/* Page Structure */
body {
  display: grid;
  align-items: start;
  grid-template-columns: clamp(var(--spacing3), 5%, var(--max-padding)) 1fr clamp(
      var(--spacing3),
      5%,
      var(--max-padding)
    );
  grid-template-rows: min-content min-content auto min-content;
  grid-template-areas:
    ".      header ."
    ".      nav    ."
    ".      main   ."
    "footer footer footer";
  gap: var(--spacing3);
}

body.sidebar {
  grid-template-columns: clamp(var(--spacing3), 5%, var(--max-padding)) 1fr 3fr clamp(
      var(--spacing3),
      5%,
      var(--max-padding)
    );
  grid-template-rows: min-content min-content min-content auto min-content;
  grid-template-areas:
    ". header  header ."
    ". nav     nav    ."
    ". sidebar main   ."
    ". .       main   ."
    "footer footer footer footer";
}

@media screen and (max-width: 992px) {
  body {
    grid-template-areas:
      ".      header ."
      "nav    nav    nav"
      ".      main   ."
      "footer footer footer";
  }
  body.sidebar {
    grid-template-areas:
      ". header  header ."
      "nav  nav  nav  nav"
      ". sidebar main   ."
      ". .       main   ."
      "footer footer footer footer";
  }
}

.pla-header {
  padding-top: var(--spacing4);
  grid-area: header;
}

.pla-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing3);
}

.pla-nav {
  grid-area: nav;
}

.pla-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--spacing3);
}

.pla-footer {
  grid-area: footer;
}

/* Block Styles */
html {
  accent-color: var(--brand);
}

body {
  font-size: 16px;
  font-family: "Lato", sans-serif;
  line-height: 1.5;
  color: var(--text1);
  background-color: var(--surface3);
}

section {
  background-color: var(--surface2);
  border-radius: var(--corner-roundness2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--spacing3) var(--spacing4);
  box-shadow: var(--shadow-4);
}

.pla-sidebar section {
  gap: var(--spacing2);
}

.pla-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.pla-control-spaced {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.pla-control-ivs {
  align-items: center;
}

.pla-control-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: var(--spacing2) 0 var(--spacing0);
  gap: var(--spacing2);
}

/* Inputs */
input[type="checkbox"] {
  padding: var(--spacing1);
}

input[type="text"],
input[type="number"],
select {
  color: var(--text1);
  background-color: var(--surface3);
  padding: var(--spacing1) var(--spacing2);
  border: 2px solid var(--surface3);
  border-radius: var(--corner-roundness1);
}

.select {
  color: var(--text1);
  background-color: var(--surface3);
  padding: var(--spacing1) var(--spacing2);
  border: 2px solid var(--surface3);
  border-radius: var(--corner-roundness1);
}

[color-scheme="light"] input[type="text"],
[color-scheme="light"] input[type="number"],
[color-scheme="light"] select {
  border: 2px solid var(--gray-5);
}

input[type="text"]:active,
input[type="text"]:focus,
input[type="text"]:focus-visible,
input[type="number"]:active,
input[type="number"]:focus,
input[type="number"]:focus-visible {
  outline-color: var(--brand);
  border-color: var(--brand);
}

/* Header */
.pla-heading {
  font-size: 2rem;
  font-weight: 700;
}

.pla-heading-highlight {
  font-size: 2.15rem;
  font-weight: 800;
  background: -webkit-linear-gradient(var(--blue-1), var(--blue-2));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav bar */
.pla-nav {
  background-color: var(--surface3);
  border-radius: var(--corner-roundness2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 var(--spacing4);
  box-shadow: var(--shadow-4);
}

[color-scheme="dark"] .pla-nav {
  background-color: var(--surface2);
}

.pla-nav ul {
  padding: 0;
  display: flex;
  justify-content: space-evenly;
}

.pla-nav li {
  margin: 0;
  list-style-type: none;
}

.pla-nav a {
  text-align: center;
  width: 15ch;
  display: block;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand);
  padding: var(--spacing2);
}

.pla-nav a:hover,
.pla-nav a:focus {
  color: var(--surface2);
  background-color: var(--brand);
}

.pla-nav a:active {
  color: var(--surface2);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

@media screen and (max-width: 992px) {
  .pla-nav {
    border-radius: 0;
  }

  .pla-nav a {
    width: 14ch;
  }
}

/* Footer */
.pla-footer {
  text-align: center;
  padding: var(--spacing3);
}

.pla-footer a {
  text-decoration: none;
  color: rgba(var(--brand-rgb), 0.6);
  padding: var(--spacing0) var(--spacing4);
}

.pla-footer a:hover {
  color: var(--brand);
}

/* Regular button */
.pla-button {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--text1);
  letter-spacing: 0.02rem;
  cursor: pointer;
  font-weight: bold;
  padding: var(--spacing1) var(--spacing2);
  border-radius: var(--corner-roundness1);
  border: 2px solid var(--brand);
  background-color: transparent;
}

[color-scheme="dark"] .pla-button {
  font-weight: 600;
}

.pla-button:hover,
.pla-button:focus {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.pla-button:active {
  border: 2px solid var(--text2);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

.pla-button:disabled {
  color: var(--surface1);
  background-color: rgba(var(--brand-rgb), 0.2);
}

.tab {
  overflow: hidden;
  border: 2px solid var(--brand);
  background-color: transparent;
}

.tab button {
  background-color: inherit;
  float: left;
  border: 1px solid var(--brand);
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}

.tab button:hover {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.tab button.active {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.tabcontent {
  display: none;
  padding: 6px 12px;
  border-top: none;
}

/* Action Button */
.pla-button-action {
  border: 2px solid var(--brand);
  background-color: rgba(var(--brand-rgb), 1);
}

.pla-button-action:hover,
.pla-button-action:focus {
  border: 2px solid var(--text2);
  background-color: rgba(var(--brand-rgb), 0.6);
}

.pla-button-action:active {
  border: 2px solid var(--text1);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

/* Expandabile Sections */
section.pla-section-expandable {
  gap: 0;
}

.pla-section-expandable .expandable {
  display: flex;
  flex-direction: column;
  gap: var(--spacing2);
}

.pla-section-expandable .expandable > *:first-child {
  padding-top: var(--spacing2);
}

.expandable {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.expandable-control {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.expandable-control:before {
  content: "";
}

.expandable-control:after {
  content: "\02795"; /* Unicode character for "plus" sign (+) */
  color: var(--text1);
  font-size: 0.8rem;
  font-weight: bold;
  justify-self: end;
}

.expandable-control.expanded:after {
  content: "\2796"; /* Unicode character for "minus" sign (-) */
}

/* Messages Styling */
.pla-message {
  border-radius: var(--corner-roundness1);
  padding: var(--spacing2) var(--spacing3);
  margin: var(--spacing3) 0;
}

.pla-message-error {
  color: var(--red);
  background-color: var(--red-bg);
  border: 1px solid var(--red);
}

.pla-message-info {
  color: var(--text1);
  background-color: rgba(var(--brand-rgb), 0.8);
  border: 1px solid var(--text2);
}

/* Modal Styling */
.pla-modal {
  margin: auto;
  max-width: 50ch;
  background-color: var(--surface1);
  border: none;
  border-radius: var(--corner-roundness2);
  padding: var(--spacing4) var(--spacing4);
  box-shadow: var(--shadow-5);
}

.pla-modal::backdrop {
  background: rgb(0 0 0 / 0.5);
}

.pla-modal p {
  margin-bottom: var(--spacing3);
}

.pla-header {
  padding-top: var(--spacing4);
  grid-area: header;
}

.pla-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing3);
}

.pla-nav {
  grid-area: nav;
}

.pla-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--spacing3);
}

.pla-footer {
  grid-area: footer;
}

/* Block Styles */
html {
  accent-color: var(--brand);
}

body {
  font-size: 16px;
  font-family: "Lato", sans-serif;
  line-height: 1.5;
  color: var(--text1);
  background-color: var(--surface3);
}

section {
  background-color: var(--surface2);
  border-radius: var(--corner-roundness2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--spacing3) var(--spacing4);
  box-shadow: var(--shadow-4);
}

.pla-sidebar section {
  gap: var(--spacing2);
}

.pla-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.pla-control-spaced {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.pla-control-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: var(--spacing2) 0 var(--spacing0);
  gap: var(--spacing2);
}

/* Inputs */
input[type="checkbox"] {
  padding: var(--spacing1);
}

input[type="text"],
input[type="number"],
select {
  color: var(--text1);
  background-color: var(--surface3);
  padding: var(--spacing1) var(--spacing2);
  border: 2px solid var(--surface3);
  border-radius: var(--corner-roundness1);
}

[color-scheme="light"] input[type="text"],
[color-scheme="light"] input[type="number"],
[color-scheme="light"] select {
  border: 2px solid var(--gray-5);
}

input[type="text"]:active,
input[type="text"]:focus,
input[type="text"]:focus-visible,
input[type="number"]:active,
input[type="number"]:focus,
input[type="number"]:focus-visible {
  outline-color: var(--brand);
  border-color: var(--brand);
}

/* Header */
.pla-heading {
  font-size: 2rem;
  font-weight: 700;
}

.pla-heading-highlight {
  font-size: 2.15rem;
  font-weight: 800;
  background: -webkit-linear-gradient(var(--blue-1), var(--blue-2));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav bar */
.pla-nav {
  background-color: var(--surface3);
  border-radius: var(--corner-roundness2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 var(--spacing4);
  box-shadow: var(--shadow-4);
}

[color-scheme="dark"] .pla-nav {
  background-color: var(--surface2);
}

.pla-nav ul {
  padding: 0;
  display: flex;
  justify-content: space-evenly;
}

.pla-nav li {
  margin: 0;
  list-style-type: none;
}

.pla-nav a {
  text-align: center;
  width: 15ch;
  display: block;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand);
  padding: var(--spacing2);
}

.pla-nav a:hover,
.pla-nav a:focus {
  color: var(--surface2);
  background-color: var(--brand);
}

.pla-nav a:active {
  color: var(--surface2);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

@media screen and (max-width: 992px) {
  .pla-nav {
    border-radius: 0;
  }

  .pla-nav a {
    width: 14ch;
  }
}

/* Footer */
.pla-footer {
  text-align: center;
  padding: var(--spacing3);
}

.pla-footer a {
  text-decoration: none;
  color: rgba(var(--brand-rgb), 0.6);
  padding: var(--spacing0) var(--spacing4);
}

.pla-footer a:hover {
  color: var(--brand);
}

/* Regular button */
.pla-button {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--text1);
  letter-spacing: 0.02rem;
  cursor: pointer;
  font-weight: bold;
  padding: var(--spacing1) var(--spacing2);
  border-radius: var(--corner-roundness1);
  border: 2px solid var(--brand);
  background-color: transparent;
}

[color-scheme="dark"] .pla-button {
  font-weight: 600;
}

.pla-button:hover,
.pla-button:focus {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.pla-button:active {
  border: 2px solid var(--text2);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

.pla-button:disabled {
  color: var(--surface1);
  background-color: rgba(var(--brand-rgb), 0.2);
}

.tab {
  overflow: hidden;
  border: 2px solid var(--brand);
  background-color: transparent;
}

.tab button {
  background-color: inherit;
  float: left;
  border: 1px solid var(--brand);
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}

.tab button:hover {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.tab button.active {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.tabcontent {
  display: none;
  padding: 6px 12px;
  border-top: none;
}

/* Action Button */
.pla-button-action {
  border: 2px solid var(--brand);
  background-color: rgba(var(--brand-rgb), 1);
}

.pla-button-action:hover,
.pla-button-action:focus {
  border: 2px solid var(--text2);
  background-color: rgba(var(--brand-rgb), 0.6);
}

.pla-button-action:active {
  border: 2px solid var(--text1);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

/* Expandabile Sections */
section.pla-section-expandable {
  gap: 0;
}

.pla-section-expandable .expandable {
  display: flex;
  flex-direction: column;
  gap: var(--spacing2);
}

.pla-section-expandable .expandable > *:first-child {
  padding-top: var(--spacing2);
}

.expandable {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.expandable-control {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.expandable-control:before {
  content: "";
}

.expandable-control:after {
  content: "\02795"; /* Unicode character for "plus" sign (+) */
  color: var(--text1);
  font-size: 0.8rem;
  font-weight: bold;
  justify-self: end;
}

.expandable-control.expanded:after {
  content: "\2796"; /* Unicode character for "minus" sign (-) */
}

/* Messages Styling */
.pla-message {
  border-radius: var(--corner-roundness1);
  padding: var(--spacing2) var(--spacing3);
  margin: var(--spacing3) 0;
}

.pla-message-error {
  color: var(--red);
  background-color: var(--red-bg);
  border: 1px solid var(--red);
}

.pla-message-info {
  color: var(--text1);
  background-color: rgba(var(--brand-rgb), 0.8);
  border: 1px solid var(--text2);
}

/* Modal Styling */
.pla-modal {
  margin: auto;
  max-width: 50ch;
  background-color: var(--surface1);
  border: none;
  border-radius: var(--corner-roundness2);
  padding: var(--spacing4) var(--spacing4);
  box-shadow: var(--shadow-5);
}

.pla-modal::backdrop {
  background: rgb(0 0 0 / 0.5);
}

.pla-modal p {
  margin-bottom: var(--spacing3);
}

.pla-header {
  padding-top: var(--spacing4);
  grid-area: header;
}

.swsh-main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--spacing3);
}

.swsh-nav {
  grid-area: nav;
}

.swsh-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--spacing3);
}

.swsh-footer {
  grid-area: footer;
}

/* Block Styles */
html {
  accent-color: var(--brand);
}

body {
  font-size: 16px;
  font-family: "Lato", sans-serif;
  line-height: 1.5;
  color: var(--text1);
  background-color: var(--surface3);
}

section {
  background-color: var(--surface2);
  border-radius: var(--corner-roundness2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: var(--spacing3) var(--spacing4);
  box-shadow: var(--shadow-4);
}

.swsh-sidebar section {
  gap: var(--spacing2);
}

.swsh-control {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.swsh-control-spaced {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.swsh-control-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: var(--spacing2) 0 var(--spacing0);
  gap: var(--spacing2);
}

/* Inputs */
input[type="checkbox"] {
  padding: var(--spacing1);
}

input[type="text"],
input[type="number"],
select {
  color: var(--text1);
  background-color: var(--surface3);
  padding: var(--spacing1) var(--spacing2);
  border: 2px solid var(--surface3);
  border-radius: var(--corner-roundness1);
}

[color-scheme="light"] input[type="text"],
[color-scheme="light"] input[type="number"],
[color-scheme="light"] select {
  border: 2px solid var(--gray-5);
}

input[type="text"]:active,
input[type="text"]:focus,
input[type="text"]:focus-visible,
input[type="number"]:active,
input[type="number"]:focus,
input[type="number"]:focus-visible {
  outline-color: var(--brand);
  border-color: var(--brand);
}

/* Header */
.swsh-heading {
  font-size: 2rem;
  font-weight: 700;
}

.swsh-heading-highlight {
  font-size: 2.15rem;
  font-weight: 800;
  background: -webkit-linear-gradient(var(--blue-1), var(--blue-2));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Nav bar */
.swsh-nav {
  background-color: var(--surface3);
  border-radius: var(--corner-roundness2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0 var(--spacing4);
  box-shadow: var(--shadow-4);
}

[color-scheme="dark"] .swsh-nav {
  background-color: var(--surface2);
}

.swsh-nav ul {
  padding: 0;
  display: flex;
  justify-content: space-evenly;
}

.swsh-nav li {
  margin: 0;
  list-style-type: none;
}

.swsh-nav a {
  text-align: center;
  width: 15ch;
  display: block;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand);
  padding: var(--spacing2);
}

.swsh-nav a:hover,
.swsh-nav a:focus {
  color: var(--surface2);
  background-color: var(--brand);
}

.swsh-nav a:active {
  color: var(--surface2);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

@media screen and (max-width: 992px) {
  .swsh-nav {
    border-radius: 0;
  }

  .swsh-nav a {
    width: 14ch;
  }
}

/* Footer */
.swsh-footer {
  text-align: center;
  padding: var(--spacing3);
}

.swsh-footer a {
  text-decoration: none;
  color: rgba(var(--brand-rgb), 0.6);
  padding: var(--spacing0) var(--spacing4);
}

.swsh-footer a:hover {
  color: var(--brand);
}

/* Regular button */
.swsh-button {
  display: block;
  text-align: center;
  text-decoration: none;
  color: var(--text1);
  letter-spacing: 0.02rem;
  cursor: pointer;
  font-weight: bold;
  padding: var(--spacing1) var(--spacing2);
  border-radius: var(--corner-roundness1);
  border: 2px solid var(--brand);
  background-color: transparent;
}

[color-scheme="dark"] .swsh-button {
  font-weight: 600;
}

.swsh-button:hover,
.swsh-button:focus {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.swsh-button:active {
  border: 2px solid var(--text2);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

.swsh-button:disabled {
  color: var(--surface1);
  background-color: rgba(var(--brand-rgb), 0.2);
}

.tab {
  overflow: hidden;
  border: 2px solid var(--brand);
  background-color: transparent;
}

.tab button {
  background-color: inherit;
  float: left;
  border: 1px solid var(--brand);
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}

.tab button:hover {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.tab button.active {
  background-color: rgba(var(--brand-rgb), 0.6);
}

.tabcontent {
  display: none;
  padding: 6px 12px;
  border-top: none;
}

/* Action Button */
.swsh-button-action {
  border: 2px solid var(--brand);
  background-color: rgba(var(--brand-rgb), 1);
}

.swsh-button-action:hover,
.swsh-button-action:focus {
  border: 2px solid var(--text2);
  background-color: rgba(var(--brand-rgb), 0.6);
}

.swsh-button-action:active {
  border: 2px solid var(--text1);
  background: linear-gradient(
    rgba(var(--blue-1-rgb), 0.6),
    rgba(var(--blue-2-rgb), 0.6)
  );
}

/* Expandabile Sections */
section.swsh-section-expandable {
  gap: 0;
}

.swsh-section-expandable .expandable {
  display: flex;
  flex-direction: column;
  gap: var(--spacing2);
}

.swsh-section-expandable .expandable > *:first-child {
  padding-top: var(--spacing2);
}

.expandable {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
}

.expandable-control {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.expandable-control:before {
  content: "";
}

.expandable-control:after {
  content: "\02795"; /* Unicode character for "plus" sign (+) */
  color: var(--text1);
  font-size: 0.8rem;
  font-weight: bold;
  justify-self: end;
}

.expandable-control.expanded:after {
  content: "\2796"; /* Unicode character for "minus" sign (-) */
}

/* Messages Styling */
.swsh-message {
  border-radius: var(--corner-roundness1);
  padding: var(--spacing2) var(--spacing3);
  margin: var(--spacing3) 0;
}

.swsh-message-error {
  color: var(--red);
  background-color: var(--red-bg);
  border: 1px solid var(--red);
}

.swsh-message-info {
  color: var(--text1);
  background-color: rgba(var(--brand-rgb), 0.8);
  border: 1px solid var(--text2);
}

/* Modal Styling */
.swsh-modal {
  margin: auto;
  max-width: 50ch;
  background-color: var(--surface1);
  border: none;
  border-radius: var(--corner-roundness2);
  padding: var(--spacing4) var(--spacing4);
  box-shadow: var(--shadow-5);
}

.swsh-modal::backdrop {
  background: rgb(0 0 0 / 0.5);
}

.swsh-modal p {
  margin-bottom: var(--spacing3);
}
/* PAGE STYLES */

/* Results */
.pla-results {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--spacing3);
  min-height: 60vh;
}

.pla-results-message {
  text-align: center;
  max-width: 80ch;
  padding-bottom: 5vh;
  margin: auto;
}

.pla-results-item {
  border-radius: var(--corner-roundness2);
  padding: var(--spacing1) var(--spacing3) var(--spacing2);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: var(--spacing0);
  background-color: var(--surface1);
}

.pla-results-ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 3ch;
}

.pla-results-heading {
  margin-bottom: var(--spacing1);
  justify-content: space-between;
}

.pla-results-ul:not(.pla-results-heading) {
  margin-left: var(--spacing3);
}

.pla-results-ul li:not(:first-child) {
  margin-left: var(--spacing3);
}

.pla-result-true {
  text-transform: capitalize;
  color: var(--brand);
  font-weight: bold;
}

.pla-result-false {
  text-transform: capitalize;
  color: var(--text2);
}

.pla-male {
  color: blue;
  font-weight: bold;
}

.pla-female {
  color: pink;
  font-weight: bold;
}

.pla-results-firstpath {
  color: var(--brand);
  font-weight: bold;
}

.pla-results-revisit {
  color: var(--color-revisit);
  font-weight: bold;
}

.pla-results-bonus {
  color: var(--color-bonus);
  font-weight: bold;
}

.pla-results-init {
  color: var(--color-init);
  font-weight: bold;
}

.pla-results-species {
  font-size: 1.25rem;
  font-weight: bold;
}

.pla-results-label {
  display: inline-block;
  min-width: 7ch;
}

/* IVs */
.pla-results-ivs-container {
  display: flex;
  margin-left: var(--spacing3);
}

.pla-results-ivs {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pla-results-ivs li {
  display: inline-block;
}

.pla-results-ivs li:not(:first-child)::before {
  font-weight: normal;
  color: var(--text1);
  content: " / ";
  margin-left: 0.1rem;
}

.pla-iv-minus {
  font-weight: bold;
  color: var(--brand);
}

.pla-iv-plus {
  font-weight: bold;
  color: red;
}


.count-results {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--spacing3);
  min-height: 60vh;
}

.count-results-message {
  text-align: center;
  max-width: 80ch;
  padding-bottom: 5vh;
  margin: auto;
}

.count-results-item {
  border-radius: var(--corner-roundness2);
  padding: var(--spacing1) var(--spacing3) var(--spacing2);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: var(--spacing0);
  background-color: var(--surface1);
}

.count-results-ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 3ch;
}

.count-results-heading {
  margin-bottom: var(--spacing1);
  justify-content: space-between;
}

.count-results-ul:not(.count-results-heading) {
  margin-left: var(--spacing3);
}

.count-results-ul li:not(:first-child) {
  margin-left: var(--spacing3);
}

.count-result-true {
  text-transform: capitalize;
  color: var(--brand);
  font-weight: bold;
}

.count-result-false {
  text-transform: capitalize;
  color: var(--text2);
}

.count-male {
  color: blue;
  font-weight: bold;
}

.count-female {
  color: pink;
  font-weight: bold;
}

.count-results-firstpath {
  color: var(--brand);
  font-weight: bold;
}

.count-results-revisit {
  color: var(--color-revisit);
  font-weight: bold;
}

.count-results-bonus {
  color: var(--color-bonus);
  font-weight: bold;
}

.count-results-init {
  color: var(--color-init);
  font-weight: bold;
}

.count-results-species {
  font-size: 1.25rem;
  font-weight: bold;
}

.count-results-label {
  display: inline-block;
  min-width: 7ch;
}

/* IVs */
.count-results-ivs-container {
  display: flex;
  margin-left: var(--spacing3);
}

.count-results-ivs {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}

.count-results-ivs li {
  display: inline-block;
}

.count-results-ivs li:not(:first-child)::before {
  font-weight: normal;
  color: var(--text1);
  content: " / ";
  margin-left: 0.1rem;
}

.count-iv-minus {
  font-weight: bold;
  color: var(--brand);
}

.count-iv-plus {
  font-weight: bold;
  color: red;
}

.swsh-results {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--spacing3);
  min-height: 60vh;
}

.swsh-results-message {
  text-align: center;
  max-width: 80ch;
  padding-bottom: 5vh;
  margin: auto;
}

.swsh-results-item {
  border-radius: var(--corner-roundness2);
  padding: var(--spacing1) var(--spacing3) var(--spacing2);
  box-shadow: var(--shadow-2);
  display: flex;
  flex-direction: column;
  gap: var(--spacing0);
  background-color: var(--surface1);
}

.swsh-results-ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 3ch;
}

.swsh-results-heading {
  margin-bottom: var(--spacing1);
  justify-content: space-between;
}

.swsh-results-ul:not(.swsh-results-heading) {
  margin-left: var(--spacing3);
}

.swsh-results-ul li:not(:first-child) {
  margin-left: var(--spacing3);
}

.swsh-result-true {
  text-transform: capitalize;
  color: var(--brand);
  font-weight: bold;
}

.swsh-result-false {
  text-transform: capitalize;
  color: var(--text2);
}

.swsh-male {
  color: blue;
  font-weight: bold;
}

.swsh-female {
  color: pink;
  font-weight: bold;
}

.swsh-results-firstpath {
  color: var(--brand);
  font-weight: bold;
}

.swsh-results-revisit {
  color: var(--color-revisit);
  font-weight: bold;
}

.swsh-results-bonus {
  color: var(--color-bonus);
  font-weight: bold;
}

.swsh-results-init {
  color: var(--color-init);
  font-weight: bold;
}

.swsh-results-species {
  font-size: 1.25rem;
  font-weight: bold;
}

.swsh-results-label {
  display: inline-block;
  min-width: 7ch;
}

/* IVs */
.swsh-results-ivs-container {
  display: flex;
  margin-left: var(--spacing3);
}

.swsh-results-ivs {
  display: inline;
  list-style: none;
  margin: 0;
  padding: 0;
}

.swsh-results-ivs li {
  display: inline-block;
}

.swsh-results-ivs li:not(:first-child)::before {
  font-weight: normal;
  color: var(--text1);
  content: " / ";
  margin-left: 0.1rem;
}

.swsh-iv-minus {
  font-weight: bold;
  color: var(--brand);
}

.swsh-iv-plus {
  font-weight: bold;
  color: red;
}
/* Settings */
#pla-research-filter {
  width: clamp(50%, 40ch, 90%);
}

.pla-research-table-container {
  height: clamp(60vh, 75vh, 90vh);
  overflow-y: auto;
  padding: 0 var(--spacing2);
}

.pla-research-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--spacing1);
}

.pla-research-row {
  background-clip: padding-box;
  height: 56px;
  box-shadow: var(--shadow-2);
  border-radius: 27px var(--corner-roundness2) var(--corner-roundness2) 27px;
  background-color: var(--surface1);
}

.pla-research-table td {
  vertical-align: middle;
}

.pla-research-table td:first-child {
  border-top-left-radius: 27px;
  border-bottom-left-radius: 27px;
}

.pla-research-table td:last-child {
  border-top-right-radius: var(--corner-roundness2);
  border-bottom-right-radius: var(--corner-roundness2);
}

.pla-research-row input[type="radio"] {
  margin: 0 var(--spacing1);
}

.pla-research-col1 {
  min-width: 68px;
  width: 10%;
  text-align: center;
}

.pla-research-col3 {
  min-width: 10ch;
  width: 15%;
}

#pla-research-selectsave {
  opacity: 0;
  width: 0.1px;
  height: 0.1px;
  position: absolute;
}

#pla-research-selectsave + label {
  padding: var(--spacing2) var(--spacing4);
}

#pla-research-selectsave:focus + label,
#pla-research-selectsave:hover + label {
  outline: 1px solid var(--color-shadow);
}

/* Color Theme Toggle */
.theme-toggle {
  cursor: pointer;
  border: none;
  background-color: transparent;
  padding: var(--spacing1);
}

.theme-toggle svg {
  stroke: var(--text1);
  fill: var(--text1);
  stroke-linecap: round;
  stroke-linejoin: round;
}

[color-scheme="light"] .theme-toggle:hover svg {
  stroke: black;
  fill: black;
}

[color-scheme="dark"] .theme-toggle:hover svg {
  stroke: white;
  fill: white;
}

/* Page Background */
.pla-background-1 {
  background-image: url("/static/img/pla-header.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left top;
  opacity: 0.1;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(300px, 35vh, 600px);
  z-index: -100;
}

[color-scheme="light"] .pla-background-1 {
  opacity: 0.2;
}

[color-scheme="dark"] .pla-background-1 {
  opacity: 0.1;
}

.pla-background-2 {
  background-color: var(--surface3);
  position: absolute;
  top: clamp(250px, 25vh, 550px);
  left: 0;
  right: 0;
  z-index: -99;
  height: 30vh;
  transform: translateY(-5vw) skewY(-5deg);
  box-shadow: 0px 0px 80px 80px var(--surface3);
}

@media screen and (min-width: 2400px) {
  .pla-background-2 {
    transform: translateY(-5vw) skewY(-4deg);
  }
}

/* Loading Spinner */
.pla-spinner {
  margin: auto;
}

.pla-loading {
  padding: 2rem;
  background-color: var(--surface2);
}

.lds-roller {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  align-self: center;
}
.lds-roller.small {
  position: relative;
  width: 1rem;
  height: 1rem;
  transform-origin: center;
  transform: scale(0.4, 0.4) translate(-2rem, -2rem);
}
.lds-roller div {
  animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  transform-origin: 40px 40px;
}
.lds-roller div:after {
  content: " ";
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  margin: -4px 0 0 -4px;
}
.lds-roller div:nth-child(1) {
  animation-delay: -0.036s;
}
.lds-roller div:nth-child(1):after {
  top: 63px;
  left: 63px;
}
.lds-roller div:nth-child(2) {
  animation-delay: -0.072s;
}
.lds-roller div:nth-child(2):after {
  top: 68px;
  left: 56px;
}
.lds-roller div:nth-child(3) {
  animation-delay: -0.108s;
}
.lds-roller div:nth-child(3):after {
  top: 71px;
  left: 48px;
}
.lds-roller div:nth-child(4) {
  animation-delay: -0.144s;
}
.lds-roller div:nth-child(4):after {
  top: 72px;
  left: 40px;
}
.lds-roller div:nth-child(5) {
  animation-delay: -0.18s;
}
.lds-roller div:nth-child(5):after {
  top: 71px;
  left: 32px;
}
.lds-roller div:nth-child(6) {
  animation-delay: -0.216s;
}
.lds-roller div:nth-child(6):after {
  top: 68px;
  left: 24px;
}
.lds-roller div:nth-child(7) {
  animation-delay: -0.252s;
}
.lds-roller div:nth-child(7):after {
  top: 63px;
  left: 17px;
}
.lds-roller div:nth-child(8) {
  animation-delay: -0.288s;
}
.lds-roller div:nth-child(8):after {
  top: 56px;
  left: 12px;
}
@keyframes lds-roller {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
